﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Collections.ObjectModel;

namespace Clipper.Model.ViewModel
{
    /// <summary>
    /// 样本病人信息
    /// </summary>
    public class PatientSampleVM : AbstractModel
    {
        #region Model

        //private long _patientid;
        //private string _name;
        //private string _sex;
        //private int? _surgerynumber;
        //private int? _hospitalization;
        //private int? _bednumber;
        //private string _section;
        //private string _infectedpatch;
        //private DateTime _createtime;
        //private string _note;
        ///// <summary>
        ///// 
        ///// </summary>
        //public long PatientID
        //{
        //    set { 
        //        _patientid = value;
        //        NotifyPropertyChanged("PatientID");
        //    }
        //    get { return _patientid; }
        //}
        ///// <summary>
        ///// 
        ///// </summary>
        //public string Name
        //{
        //    set
        //    {
        //        _name = value;
        //        NotifyPropertyChanged("Name");
        //    }
        //    get { return _name; }
        //}
        ///// <summary>
        ///// 
        ///// </summary>
        //public string Sex
        //{
        //    set { 
        //        _sex = value;
        //        NotifyPropertyChanged("Sex");
        //    }
        //    get { return _sex; }
        //}
        ///// <summary>
        ///// 
        ///// </summary>
        //public int? SurgeryNumber
        //{
        //    set
        //    {
        //        _surgerynumber = value;
        //        NotifyPropertyChanged("SurgeryNumber");
        //    }
        //    get { return _surgerynumber; }
        //}
        ///// <summary>
        ///// 
        ///// </summary>
        //public int? Hospitalization
        //{
        //    set
        //    {
        //        _hospitalization = value;
        //        NotifyPropertyChanged("Hospitalization");
        //    }
        //    get { return _hospitalization; }
        //}
        ///// <summary>
        ///// 
        ///// </summary>
        //public int? BedNumber
        //{
        //    set {
        //        _bednumber = value;
        //        NotifyPropertyChanged("BedNumber");
        //    }
        //    get { return _bednumber; }
        //}
        ///// <summary>
        ///// 
        ///// </summary>
        //public string Section
        //{
        //    set { _section = value;
        //    NotifyPropertyChanged("Section");
        //    }
        //    get { return _section; }
        //}
        ///// <summary>
        ///// 
        ///// </summary>
        //public string InfectedPatch
        //{
        //    set { _infectedpatch = value;
        //    NotifyPropertyChanged("InfectedPatch");
        //    }
        //    get { return _infectedpatch; }
        //}
        ///// <summary>
        ///// 
        ///// </summary>
        //public DateTime CreateTime
        //{
        //    set { _createtime = value;
        //    NotifyPropertyChanged("CreateTime");
        //    }
        //    get { return _createtime; }
        //}
        ///// <summary>
        ///// 
        ///// </summary>
        //public string Note
        //{
        //    set { _note = value;
        //    NotifyPropertyChanged("Note");    
        //    }
        //    get { return _note; }
        //}

        #endregion Model

        ObservableCollection<SexClass> sexSource;
        ObservableCollection<SampleInfo> newSample;
        ObservableCollection<SampleInfo> sampleList;

        /// <summary>
        /// 性别列表
        /// </summary>
        public ObservableCollection<SexClass> SexSource
        {
            get
            {
                return sexSource;
            }
            set
            {
                sexSource = value;
            }
        }
        /// <summary>
        /// 添加列表
        /// </summary>
        public ObservableCollection<SampleInfo> NewSample
        {
            get
            {
                return newSample;
            }
            set
            {
                newSample = value;
                this.NotifyPropertyChanged("NewSample");
            }
        }
        /// <summary>
        /// 样本列表
        /// </summary>
        public ObservableCollection<SampleInfo> SampleList
        {
            get
            {
                return sampleList;
            }
            set
            {
                sampleList = value;

            }
        }

        ObservableCollection<Clipper.Model.DetectItems> selectedItem;
        /// <summary>
        /// 添加新样本，选中的检测项
        /// </summary>
        public ObservableCollection<Clipper.Model.DetectItems> SelectedItem
        {
            get
            {
                return selectedItem;
            }
            set
            {
                selectedItem = value;
                this.NotifyPropertyChanged("SelectedItem");
            }
        }

        public PatientSampleVM()
        {
            selectedItem = new ObservableCollection<Clipper.Model.DetectItems>();
            newSample = new ObservableCollection<SampleInfo>();
            //{
            //    new SampleInfo()
            //};
            sexSource = new ObservableCollection<SexClass>()
            {
                new SexClass(){Name="男",ID=1},
                new SexClass(){Name="女",ID=2}
            };
            
        }
    }

    public class SexClass
    {
        public string Name
        {
            get;
            set;
        }
        public int ID
        {
            get;
            set;
        }
    }
    
}
